/**
 * Copyright (c) 2008
 * Author: Heka Lok <heka.lok@gmail.com>
 * Author: David Feilen <bastian.mezurashii@gmail.com>
 *
 * Date: 15 June, 2008
 * Licence: MIT
 *
 * See_Also: http://enlightenment.org
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:

 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 **/

module defl.c.evas.engine.buffer;

private import defl.c.evas : Evas_Engine_Info;

extern(C)
{
const int EVAS_ENGINE_BUFFER_DEPTH_ARGB32 = 0;
const int EVAS_ENGINE_BUFFER_DEPTH_BGRA32 = 1;
const int EVAS_ENGINE_BUFFER_DEPTH_RGB24  = 2;
const int EVAS_ENGINE_BUFFER_DEPTH_BGR24  = 3;
const int EVAS_ENGINE_BUFFER_DEPTH_RGB32  = 4;

struct Evas_Engine_Info_Buffer
{
   /* PRIVATE - don't mess with this baby or evas will poke its tongue out */
   /* at you and make nasty noises */
   Evas_Engine_Info magic;

   struct Info {
      int   depth_type;

      void* dest_buffer;
      int   dest_buffer_row_bytes;

      char  use_color_key; // Bitfield, not sure how to deal with this.
      int   alpha_threshold;
      int   color_key_r;
      int   color_key_g;
      int   color_key_b;
      
      struct Func {
	  	void* function(int x, int y, int w, int h, int* row_bytes) new_update_region;
	  	void  function(int x, int y, int w, int h, void* data) free_update_region;
      } 
      
      Func func;
   } 
   
   Info info;
}
}
